<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts: server/server.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts
   &#160;<span id="projectnumber">1.0</span>
   </div>
   <div id="projectbrief">ESP8266ILI9341DisplayProject</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_41e1742e44e2de38b3bc91f993fed282.html">server</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">server.c File Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>Network test client This code receives a message and displays iit.  
<a href="#details">More...</a></p>
<div class="textblock"><code>#include &quot;<a class="el" href="user__config_8h_source.html">user_config.h</a>&quot;</code><br />
<code>#include &lt;stdint.h&gt;</code><br />
<code>#include &lt;stdarg.h&gt;</code><br />
<code>#include &lt;string.h&gt;</code><br />
<code>#include &lt;math.h&gt;</code><br />
<code>#include &quot;<a class="el" href="ili9341_8h_source.html">display/ili9341.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="network_8h_source.html">network/network.h</a>&quot;</code><br />
<code>#include &quot;<a class="el" href="server_8h_source.html">server/server.h</a>&quot;</code><br />
</div>
<p><a href="server_8c_source.html">Go to the source code of this file.</a></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a2533774d0ba0505b1b90502bdf8b0c9c"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8c.html#a2533774d0ba0505b1b90502bdf8b0c9c">SERVER_TIMEOUT</a>&#160;&#160;&#160;1</td></tr>
<tr class="separator:a2533774d0ba0505b1b90502bdf8b0c9c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad74125223df99954750abebacd84a138"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8c.html#ad74125223df99954750abebacd84a138">MAX_CONNS</a>&#160;&#160;&#160;5</td></tr>
<tr class="separator:ad74125223df99954750abebacd84a138"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:aa4a250922085a8685fc1056dbdbd89dd"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8c.html#aa4a250922085a8685fc1056dbdbd89dd">servertest_message</a> (<a class="el" href="structwindow.html">window</a> *win)</td></tr>
<tr class="memdesc:aa4a250922085a8685fc1056dbdbd89dd"><td class="mdescLeft">&#160;</td><td class="mdescRight">Network receive task.  <a href="#aa4a250922085a8685fc1056dbdbd89dd">More...</a><br /></td></tr>
<tr class="separator:aa4a250922085a8685fc1056dbdbd89dd"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a6868f619a2b0ed58a4d155c5a458fccb"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8c.html#a6868f619a2b0ed58a4d155c5a458fccb">servertest_receive</a> (void *arg, char *pdata, unsigned short len)</td></tr>
<tr class="memdesc:a6868f619a2b0ed58a4d155c5a458fccb"><td class="mdescLeft">&#160;</td><td class="mdescRight">Network receive task.  <a href="#a6868f619a2b0ed58a4d155c5a458fccb">More...</a><br /></td></tr>
<tr class="separator:a6868f619a2b0ed58a4d155c5a458fccb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0a4b06c201a20489dee20d65ad6f4f0"><td class="memItemLeft" align="right" valign="top"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8c.html#ac0a4b06c201a20489dee20d65ad6f4f0">servertest_setup</a> (int port)</td></tr>
<tr class="memdesc:ac0a4b06c201a20489dee20d65ad6f4f0"><td class="mdescLeft">&#160;</td><td class="mdescRight">Setup Server Task.  <a href="#ac0a4b06c201a20489dee20d65ad6f4f0">More...</a><br /></td></tr>
<tr class="separator:ac0a4b06c201a20489dee20d65ad6f4f0"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a>
Variables</h2></td></tr>
<tr class="memitem:a0612433c605a45ae10bbdf503ef3f236"><td class="memItemLeft" align="right" valign="top">static struct espconn *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8c.html#a0612433c605a45ae10bbdf503ef3f236">TCP_Server</a></td></tr>
<tr class="separator:a0612433c605a45ae10bbdf503ef3f236"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a15506d9f599b33b151e5efc4fdbe7021"><td class="memItemLeft" align="right" valign="top"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a>&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8c.html#a15506d9f599b33b151e5efc4fdbe7021">network_msg</a> [256]</td></tr>
<tr class="separator:a15506d9f599b33b151e5efc4fdbe7021"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a082fd9f55493d749cafc1e11ad84a2b6"><td class="memItemLeft" align="right" valign="top">static&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="server_8c.html#a082fd9f55493d749cafc1e11ad84a2b6">received</a> = 0</td></tr>
<tr class="separator:a082fd9f55493d749cafc1e11ad84a2b6"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>Network test client This code receives a message and displays iit. </p>
<dl class="section user"><dt>Copyright &copy; 2015 Mike Gore, GPL License</dt><dd></dd></dl>
<dl class="section user"><dt>You are free to use this code under the terms of GPL</dt><dd>please retain a copy of this notice in any code you use it in.</dd></dl>
<p>This is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.</p>
<p>This software is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.</p>
<p>You should have received a copy of the GNU General Public License along with this program. If not, see <a href="http://www.gnu.org/licenses/">http://www.gnu.org/licenses/</a>. </p>

<p>Definition in file <a class="el" href="server_8c_source.html">server.c</a>.</p>
</div><h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="ad74125223df99954750abebacd84a138"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define MAX_CONNS&#160;&#160;&#160;5</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="server_8c_source.html#l00045">45</a> of file <a class="el" href="server_8c_source.html">server.c</a>.</p>

</div>
</div>
<a class="anchor" id="a2533774d0ba0505b1b90502bdf8b0c9c"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define SERVER_TIMEOUT&#160;&#160;&#160;1</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="server_8c_source.html#l00044">44</a> of file <a class="el" href="server_8c_source.html">server.c</a>.</p>

<p>Referenced by <a class="el" href="server_8c_source.html#l00100">servertest_setup()</a>.</p>

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="aa4a250922085a8685fc1056dbdbd89dd"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void servertest_message </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="structwindow.html">window</a> *&#160;</td>
          <td class="paramname"><em>win</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Network receive task. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">*win</td><td>window pointer </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="server_8c_source.html#l00056">56</a> of file <a class="el" href="server_8c_source.html">server.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00348">user_loop()</a>.</p>

</div>
</div>
<a class="anchor" id="a6868f619a2b0ed58a4d155c5a458fccb"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void servertest_receive </td>
          <td>(</td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>arg</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&#160;</td>
          <td class="paramname"><em>pdata</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">unsigned short&#160;</td>
          <td class="paramname"><em>len</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Network receive task. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">*arg</td><td>network callback arg </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">*pdata</td><td>data buffer </td></tr>
    <tr><td class="paramdir">[in]</td><td class="paramname">len</td><td>buffer length </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="server_8c_source.html#l00081">81</a> of file <a class="el" href="server_8c_source.html">server.c</a>.</p>

<p>Referenced by <a class="el" href="server_8c_source.html#l00100">servertest_setup()</a>.</p>

</div>
</div>
<a class="anchor" id="ac0a4b06c201a20489dee20d65ad6f4f0"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="earth2wireframe_8c.html#ad0fe97585b8891f5e4f2b9a6426330a4">MEMSPACE</a> void servertest_setup </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>port</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Setup Server Task. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">port</td><td>TCP port for service Credits: ideas borrowed from David Ogilvy(MetalPhreak) </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>void </dd></dl>

<p>Definition at line <a class="el" href="server_8c_source.html#l00100">100</a> of file <a class="el" href="server_8c_source.html">server.c</a>.</p>

<p>Referenced by <a class="el" href="user__main_8c_source.html#l00971">setup()</a>.</p>

</div>
</div>
<h2 class="groupheader">Variable Documentation</h2>
<a class="anchor" id="a15506d9f599b33b151e5efc4fdbe7021"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="send_8c.html#aba7bc1797add20fe3efdf37ced1182c5">uint8_t</a> network_msg[256]</td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="server_8c_source.html#l00037">37</a> of file <a class="el" href="server_8c_source.html">server.c</a>.</p>

<p>Referenced by <a class="el" href="server_8c_source.html#l00056">servertest_message()</a>, <a class="el" href="server_8c_source.html#l00081">servertest_receive()</a>, and <a class="el" href="server_8c_source.html#l00100">servertest_setup()</a>.</p>

</div>
</div>
<a class="anchor" id="a082fd9f55493d749cafc1e11ad84a2b6"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">received = 0</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="server_8c_source.html#l00048">48</a> of file <a class="el" href="server_8c_source.html">server.c</a>.</p>

<p>Referenced by <a class="el" href="server_8c_source.html#l00056">servertest_message()</a>, <a class="el" href="server_8c_source.html#l00081">servertest_receive()</a>, and <a class="el" href="server_8c_source.html#l00100">servertest_setup()</a>.</p>

</div>
</div>
<a class="anchor" id="a0612433c605a45ae10bbdf503ef3f236"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname">struct espconn* TCP_Server</td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">static</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">

<p>Definition at line <a class="el" href="server_8c_source.html#l00036">36</a> of file <a class="el" href="server_8c_source.html">server.c</a>.</p>

<p>Referenced by <a class="el" href="server_8c_source.html#l00081">servertest_receive()</a>, and <a class="el" href="server_8c_source.html#l00100">servertest_setup()</a>.</p>

</div>
</div>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Wed Jan 31 2018 21:22:17 for ESP8266 ILI9341 display support code with printf sources, wire-frame viewer and custom fonts by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
